Integrand size = 26, antiderivative size = 62 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\text {arctanh}(\sin (e+f x)) \cos (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}}+\frac {\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286, 2691, 3855} \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cos (e+f x) \text {arctanh}(\sin (e+f x))}{2 f \sqrt {a \cos ^2(e+f x)}} \]
[In]
[Out]
Rule 2691
Rule 3255
Rule 3286
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \int \frac {\tan ^2(e+f x)}{\sqrt {a \cos ^2(e+f x)}} \, dx \\ & = \frac {\cos (e+f x) \int \sec (e+f x) \tan ^2(e+f x) \, dx}{\sqrt {a \cos ^2(e+f x)}} \\ & = \frac {\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cos (e+f x) \int \sec (e+f x) \, dx}{2 \sqrt {a \cos ^2(e+f x)}} \\ & = -\frac {\text {arctanh}(\sin (e+f x)) \cos (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}}+\frac {\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}} \\ \end{align*}
Time = 0.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.69 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {-\text {arctanh}(\sin (e+f x)) \cos (e+f x)+\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}} \]
[In]
[Out]
Time = 0.94 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.71
method | result | size |
default | \(\frac {\sqrt {a \left (\sin ^{2}\left (f x +e \right )\right )}\, \left (-\ln \left (\frac {2 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (f x +e \right )\right )}+2 a}{\cos \left (f x +e \right )}\right ) a \left (\cos ^{2}\left (f x +e \right )\right )+\sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (f x +e \right )\right )}\right )}{2 \cos \left (f x +e \right ) a^{\frac {3}{2}} \sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) | \(106\) |
risch | \(-\frac {i \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{\sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}+\frac {\ln \left ({\mathrm e}^{i f x}-i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}-\frac {\ln \left ({\mathrm e}^{i f x}+i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}\) | \(163\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.08 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (\cos \left (f x + e\right )^{2} \log \left (-\frac {\sin \left (f x + e\right ) + 1}{\sin \left (f x + e\right ) - 1}\right ) - 2 \, \sin \left (f x + e\right )\right )}}{4 \, a f \cos \left (f x + e\right )^{3}} \]
[In]
[Out]
\[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\int \frac {\tan ^{2}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 527 vs. \(2 (54) = 108\).
Time = 0.51 (sec) , antiderivative size = 527, normalized size of antiderivative = 8.50 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {4 \, {\left (\sin \left (3 \, f x + 3 \, e\right ) - \sin \left (f x + e\right )\right )} \cos \left (4 \, f x + 4 \, e\right ) - {\left (2 \, {\left (2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \cos \left (4 \, f x + 4 \, e\right ) + \cos \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, \sin \left (2 \, f x + 2 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right ) + {\left (2 \, {\left (2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \cos \left (4 \, f x + 4 \, e\right ) + \cos \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, \sin \left (2 \, f x + 2 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \sin \left (f x + e\right ) + 1\right ) - 4 \, {\left (\cos \left (3 \, f x + 3 \, e\right ) - \cos \left (f x + e\right )\right )} \sin \left (4 \, f x + 4 \, e\right ) + 4 \, {\left (2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \sin \left (3 \, f x + 3 \, e\right ) - 8 \, \cos \left (3 \, f x + 3 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 8 \, \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) - 8 \, \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 4 \, \sin \left (f x + e\right )}{4 \, {\left (2 \, {\left (2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \cos \left (4 \, f x + 4 \, e\right ) + \cos \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (4 \, f x + 4 \, e\right )^{2} + 4 \, \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, \sin \left (2 \, f x + 2 \, e\right )^{2} + 4 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \sqrt {a} f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (54) = 108\).
Time = 0.87 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.55 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {\frac {\log \left ({\left | \frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \right |}\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} - \frac {\log \left ({\left | \frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \right |}\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} - \frac {4 \, {\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left ({\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}^{2} - 4\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )}}{4 \, \sqrt {a} f} \]
[In]
[Out]
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{\sqrt {a-a\,{\sin \left (e+f\,x\right )}^2}} \,d x \]
[In]
[Out]